// 路由配置
import {createRouter, createWebHistory} from 'vue-router';
import Home from "@/views/Home.vue";
import ProjectResourcesModal from "@/views/ProjectResourcesModal.vue";

const routes = [
    {path: "/", name: "home", component: Home},
    {path: "/project-resources-modal", name: "ProjectResourcesModal", component: ProjectResourcesModal}, // 统一名称格式（可选）
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

// 添加导航守卫
router.beforeEach((to, from, next) => {
    // 设置固定的标题
    document.title = '村级工程项目网上公示资料检索(试运行)';
    next();
});

export default router;
